package com.appspot.finajjarane.framework.service;

import java.util.List;

import com.appspot.finajjarane.framework.generic.IGenericService;
import com.appspot.finajjarane.framework.models.ToolModel;
import com.appspot.finajjarane.framework.models.ToolModelForDao;

public interface IToolService extends IGenericService {

	/**
	 * Create a new artcile
	 * @return True if tool created, False otherwise
	 */
	public boolean toolCreateNew(final ToolModelForDao toolModel) throws Exception;

	/**
	 * Update an existing tool
	 * @param tool
	 * @return True if tool updated, False otherwise
	 */
	public boolean toolUpdate(final ToolModelForDao toolModel) throws Exception;


	/**
	 * Remove an existing tool
	 * @param tool
	 * @return True if tool removed, False otherwise
	 */
	public boolean toolRemove(final Long toolId) throws Exception;


	/**
	 * Get a limited list of tool (per page)
	 * @param page
	 * @param maxPerPage
	 * @return list of limited founded artcile (per page)
	 */
	public List<ToolModel> getToolsList(final int page, final int maxPerPage , final String lang) throws Exception;


	/**
	 * Get all tools
	 * Be careful this method can be used only if there are some tools,
	 * 	or, maybe, to perform some tests.
	 * @return list of all tools
	 */
	public List<ToolModel> getToolsAll() throws Exception;


	/**
	 * Get an tool by id
	 * @param id
	 * @return toolModel object, by getting the tool entity for the corresponding Id, and converting it
	 */
	public ToolModel getTool(final Long id) throws Exception;

	/**
	 * Get tools count
	 * @param lang
	 * @return int
	 */
	public int getToolsCount(final String lang) throws Exception;

}